import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

Vue.config.productionTip = false
import '@/components/vant.js'  //简洁
import '@/utils/request.js'  //简洁
import '@/components/iconfont.js'  //图标简洁

let token=localStorage.getItem("tt-token")
if(token){
  store.dispatch('getuserInfo',token) .then(res=>{
    new Vue({
      router,
      store,
      render: h => h(App)
    }).$mount('#app')
})
}else{

  new Vue({
    router,
    store,
    render: h => h(App)
  }).$mount('#app')

 
}


// new Vue({
//   router,
//   store,
//   render: h => h(App)
// }).$mount('#app')
